package com.test;

import org.springframework.context.support.ClassPathXmlApplicationContext;


public class main2 {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根
      System.out.println("222");
  
	 ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");
		
	
	uInfo helloWorld = (uInfo) ctx.getBean("uInfo");
		
	
	helloWorld.said();
	
	user user1=(user)ctx.getBean("idUser2");
	  alert( user1.toString());
	user  user3=(user)ctx.getBean("idUser4");
	alert(user3.toString());
	}
	
    static	void alert(String txt){
		System.out.println(txt);
		
	}
	

}
